<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--<html xmlns="http://www.w3.org/1999/xhtml">-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Author" contect="http://www.webqin.net">
<title>填写信息</title>

<link type="text/css" href="/user/css/css.css" rel="stylesheet" />


    <script type="text/javascript" src="/user/js/jquery-2.2.3.min.js"></script>
    <script type="text/javascript" src="/user/js/bootstrap.min.js"></script>
<!--下拉-->
<link rel="stylesheet" type="text/css" href="/user/fonts/iconfont.css">
<script type="text/javascript" src="/user/js/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" type="text/css" href="/user/css/layui.css">


<!-- 搜索下拉框 开始 -->
<link rel="stylesheet" type="text/css" href="/user/css/ySearchSelect.css">
<script src="/user/js/jQuery.Hz2Py-szm-min.js"></script>
<script src="/user/js/ySearchSelect.js"></script>
<!-- 搜索下拉框 结束 -->
<style>
	.layui-form {
		margin-right: 30%;
	}
	
	.layui-form-label {
		width: 110px;
	}
	
	.layui-input-block {
		margin-left: 130px;
	}
</style>
<!---->
<!--动画-->
<link rel="stylesheet" href="/user/css/animate.css" type="text/css"/>
<!---->

</head>

<body>
<!--top-->
<div class="yxq">
	<a href="../页面/index.html"><div class="bz">
    	<img src="/user/img/biaozhi.jpg"/>
    </div></a>
</div>
<!---->
  <div class="content">
  <div class="wow fadeInRight bjtx" data-wow-duration="3s">
  	<img src="/user/img/beij.png"/>
  </div>
   <div class="web-width">
     <div class="for-liucheng">
      <div class="liulist for-cur"></div>
      <div class="liulist for-cur"></div>
      <div class="liulist"></div>
      <div class="liulist"></div>
      <div class="liutextbox">
       <div class="liutext for-cur"><strong>验证手机</strong><br /><em>1</em></div>
       <div class="liutext for-cur"><strong>填写信息</strong><br /><em>2</em></div>
       <div class="liutext"><strong>设置新密码</strong><br /><em>3</em></div>
       <div class="liutext"><strong>注册完成</strong><br /><em>4</em></div>
      </div>
     </div><!--for-liucheng/-->

     <form action="${pageContext.request.contextPath}/user/student/ZcTwo" method="post" class="forget-pwd" id="formZC2">
         <%--<input type="hidden" value="${student.nickName}" name="nickName" />--%>
         <%--<input type="hidden" value="${student.phoneNum}" name="phoneNum" />--%>
         <%--<input type="hidden" value="${student.email}" name="email" />--%>
             <p id="prompt" style="color: red ; margin-left: 150px"></p>
      <dl>
        <dt>姓名：</dt>
        <dd><input type="text" name="name" id="userName" /></dd>
        <div class="clears"></div>
       </dl>
       <div>
        <!--下拉-->
        <%--<script src="/demos/googlegg.js"></script>--%>
        <div class="layui-form-item">
            <label class="layui-form-label">所在校区：</label>
            <div class="layui-input-inline">
                <div class="layui-form-select ySearchSelect y1" tabindex="1" id="chooesSchool">
                    <div class="layui-input" id="schoolDiv" ></div>
                    <i class="layui-edge"></i>
                    <ul id="ulSchoolId"></ul>
                </div>
            </div>
            <script>
                $(function() {
                    $(".y1").ySearchSelect(); //调用自定义 高亮插件
                })
            </script>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">所在班级：</label>
            <div class="layui-input-inline">
                <div class="layui-form-select ySearchSelect y3" tabindex="1" id="chooesClasses">
                    <div class="layui-input" id="classArea"></div>
                    <input type="hidden" id="inputTest" name="classId" value="1" />
                    <i class="layui-edge"></i>
                    <ul id="ulId">
                        <p>无匹配项</p>
                    </ul>
                </div>
            </div>
            <script>
                $(function() {
                    $(".y3").ySearchSelect(); //调用自定义 高亮插件
                })
            </script>
        </div>
        <!---->
       </div>
       <div class="subtijiao"><input type="submit" value="下一步" /></div> 
      </form><!--forget-pwd/-->
      
      <%--<form action="register1.jsp" method="get" class="forget-pwd fh">--%>
       <%--<div class="subtijiao"><input type="submit" value="返回上一步" /></div>--%>
      <%--</form>--%>
      
     
   </div><!--web-width/-->
  </div><!--content/-->
  
<!--bottom-->
  <div class="bottom">
  	<ul class="tm">
    	<li>智云</li>
        <li>帮助中心</li>
        <li>学习中心</li>
        <li class="yq">友情链接</li>
    </ul>
    <h6>DT人才培训基地（太原中心）&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;晋ICP备16009028号&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;咨询热线：400-7777-699&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;地址：太原市高新区平阳南路龙兴街万立科技大厦17层&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;版权所有：华信智原</h6>
  </div>
<!---->
<!--动画-->    
<script src="/user/js/wow.min.js"></script>
<script>
    function clickClass(classId) {
        $("#inputTest").val(classId);
    }
    $(function () {
        $.get("${pageContext.request.contextPath}/user/school/allS",function (data) {
            console.log(data);
            $("#ulSchoolId").empty();
            for (var i=0;i<data.length;i++){
                $("#ulSchoolId").append("<li class='on school' value="+data[i].id+">"+data[i].schoolName+"</li>")
            }
            $(".school").click(function () {
                var schoolId = $(this).val();
                $.get("${pageContext.request.contextPath}/user/school/fcbs",{"schoolId":schoolId},function (data) {
                    $("#ulId").empty();
                    for (var i=0;i<data.length;i++){
                        $("#ulId").append("<li class='on testTest' onclick='clickClass(this.value)' value="+data[i].id+">"+data[i].className+"</li>")
                    }
                })
            });
        })
    })
    $(function () {
        $("#userName").blur(checkName);
        $("#chooesSchool").blur(checkSchool);
        $("#chooesClasses").blur(checkClass);
        $("#formZC2").submit(function () {
            return checkName() && checkSchool() && checkClass();
        })
        function checkName() {
            var userName = $("#userName").val();
            var reg = /\S/;
            var flag = reg.test(userName);
                if (flag) {
                    $("#userName").css("border", "1px solid rgba(255, 255, 255, 0.4)");
                    $("#prompt").html("");
                } else {
                    $("#prompt").html("姓名不能为空");
                }
            return flag;
        }

        function checkSchool() {
            var schoolDiv = $("#schoolDiv").html();
            var reg = /\S/;
            console.log(schoolDiv)
            var flag = reg.test(schoolDiv);
            if (flag) {
                $("#schoolDiv").css("border", "1px solid rgba(255, 255, 255, 0.4)");
                $("#prompt").html("");
            } else {
                $("#schoolDiv").css("border", "1px solid red");
                $("#prompt").html("请选择校区");
            }
            return flag;
        }

        function checkClass() {
            var classArea = $("#classArea").html();
            var reg = /\S/;
            var flag = reg.test(classArea);
            if (flag) {
                $("#classArea").css("border", "1px solid rgba(255, 255, 255, 0.4)");
                $("#prompt").html("");
            } else {
                $("#prompt").html("请选择班级");
            }
            return flag;
        }

        if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){
            new WOW().init();
        }
    })
</script>
</body>
</html>
